import request from "@/utils/request";

// 发送验证码
export const reqSendCode = (phone) => {
  return request({
    method: "get",
    url: `/user/passport/sendCode/${phone}`,
  });
};

// 注册
export const reqRegister = (data) => {
  return request({
    method: "post",
    url: `/user/passport/register`,
    data,
  });
};

// 登录
export const reqLogin = (phone, password) => {
  return request({
    method: "post",
    url: `/user/passport/login`,
    data: {
      phone,
      password,
    },
  });
};
// 退出登录
export const reqLogout = () => {
  return request({
    method: "get",
    url: `/user/passport/logout`,
  });
};

